package com.fysports.web.module.view;

/**
 * 操作类型枚举类
 * Created by konbluesky
 * Date : 14-8-23 下午9:43
 * Project : JdmData_WebServer
 */
public enum OperateType {
    BAD_REQUEST("BAD_REQUEST","非法的请求路径"),
    SAVE_SUCCESS("SAVE_SUCCESS","数据保存成功"),
    SAVE_FAIL("SAVE_FAIL","数据保存失败"),
    UPDATE_SUCCESS("UPDATE_SUCCESS","数据更新成功"),
    UPDATE_FAIL("UPDATE_FAIL","数据更新失败"),
    OPERATE_SUCCESS("OPERATE_SUCCESS","操作执行成功"),
    OPERATE_FAIL("OPERATE_FAIL","操作执行失败"),
    OPERATE_FAIL_REPETITION("OPERATE_FAIL_REPETITION","抱歉，您已提交过，不能重复提交"),
    QUERY_PARAM_ERROR("QUERY_PARAM_ERROR","查询参数无效"),
    QUERY_SUCCESS("QUERY_SUCCESS","查询成功"),
    QUERY_ZERO_RECORD("QUERY_ZERO_RECORD","没有对应的查询结果");


    OperateType(String c,String str) {
        this.code=c;
        this.strVal = str;
    }

    private String code;
    private String strVal;


    public String getStrVal() {
        return strVal;
    }


    @Override
    public String toString() {
        return "OperateType{" +
                "TYPE='" + this.code + '\'' +
                ",TYPE_String='" + this.getStrVal() + '\'' +
                '}';
    }

//
//    public static void main(String[] args) {
//        System.out.println(OperateType.BAD_REQUEST.toString());
//    }
}